Repository navigation
tools, ci: each OpenSSL and libdatachannel configuration is built once, kept by b2 -a and cached by the CI - #29
Merged
Merged
Conversation
added 6 commits
November 18, 2026 00:27
…n a directory its inputs and command name, which b2 -a keeps A configuration's directory is bin/third_party/<name>/config-<hash>, the hash of the key of the library's inputs (tools/third_party_build.py key: the bytes of its scripts and its pin, after the library's own check_checkout) and of its build command. A directory that exists holds the build of exactly those inputs and that command, so its outputs are NOUPDATE: built when missing and never again, b2 -a included, which the CI's lanes run. Consumers whose properties differ only in what the command leaves out share one build: OpenSSL's C is the same with exception-handling on and off, which built it twice. The glob of the upstream trees, whose modification times decided a rebuild, is gone. A consumer depends on the selection of its configuration in its own variant directory, which tools/third_party_build.py select writes when the configuration changes, removing the library's other selections there, so the consumer is built again even when it changes back to a configuration built earlier. The lint takes a provider's headers from a dry run's header generation too: a kept configuration's archives are no longer in it.
…achannel builds in a cache tools/ci/actions/third-party restores, before a job's b2, and saves, after it, bin/third_party/openssl and bin/third_party/libdatachannel, whose configurations b2 never builds again: a job builds only those its cache lacks. The cache is the job's, on its runner image (ImageOS and ImageVersion), and starts afresh when an input of the builds or a pinned toolchain changes. A job saves it only when it built a configuration the cache did not hold, under the hash of the configurations' names; the lint's first shard saves the headers every shard generates. An own lane that runs OpenSSL's upstream suite neither restores nor saves, so the suite runs.
…t MSVC refused a size_t (C4267 under /WX)
…, which b2's case-blind glob on Windows declared and never made, so every run generated the headers again
…as a passthrough, which failed main's documentation and tools tests
…ind of a missing bin/third_party had failed every job under the runner's bash -e -o pipefail A fresh checkout has no bin/third_party, and a job may build one library alone: find then exits 1, which pipefail gave the assignment of its output and -e turned into the step's failure, before any lane ran. key.sh globs the configurations with nullglob instead, under Bash 3.2 too, which the macOS runners run steps with, and actions_test runs it on a checkout without builds and on either library's configurations alone, under each Bash it finds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
Each configuration of OpenSSL and libdatachannel is built once, in a directory its inputs and its command name, and never again,
b2 -aincluded.bin/third_party/<name>/config-<hash>. The hash covers two things:tools/third_party_build.py key: the bytes of its scripts and its pin, after the library's owncheck_checkout);NOUPDATE(tools/webcpp-third-party.jam).b2 -a, which used to rebuild every OpenSSL configuration on every run, about 27 minutes each under MSVC.exception-handlingon and off, so the same configuration was built underrelease/and again underrelease/exception-handling-off/. In a local tree, 3 of 12 OpenSSL builds were such repeats.<name>-config-<hash>.selected, whichtools/third_party_build.py selectwrites when the configuration changes, removing the library's other selections there. The consumer is built again even when it switches back to a configuration built earlier, whose directory exists and is older than the consumer.glob-tree-exof the upstream trees, whose modification times decided a rebuild, is removed. It also tripped over OpenSSL's nested submodules when they were checked out.The CI keeps those directories in a cache (
tools/ci/actions/third-party), in the lanes, the own lanes (except OpenSSL's upstream suite, which must run) and the lint (saved by its first shard).ImageOS,ImageVersion). It starts afresh when an input of the builds or a pinned toolchain changes.Two fixes the MSVC run turned up, both older than this change:
OpenSSL's VMS headers
__DECC_INCLUDE_PROLOGUE.Hand__DECC_INCLUDE_EPILOGUE.Hwere declared outputs on Windows:tools/openssl/build.pynever installs them;failed to scan filefor them.The Jamfile now leaves them out.
tools/openssl/test/threads.cppgaveRAND_priv_bytesasize_t, which 64-bit MSVC refuses under/WX(C4267).What it means for whoever builds
b2 -ano longer rebuilds OpenSSL or libdatachannel. To build a configuration again, remove its directory underbin/third_party/<name>/.Verified locally
tools/third_party_build_test.py: the key, the checkout check and the selection.tools/test/openssl_test.py, including the new cases:test_one_c_configuration_is_built_once: one build forexception-handling=on,off, which built two before.test_a_built_configuration_is_kept_and_selected, with a real build:b2 -arebuilds the program, not the archives, whose modification time is unchanged;build.pynames another directory;tools/test/libdatachannel_test.py:b2 -aafter a full build rebuilds neither provider.tools/test/cobalt_ssl_test.py,tools/test/openssl_one_copy_test.py, and the lint's provider-header cases.tools/openssl/test//threads:bin\third_party\openssl\config-<hash>(42 minutes), with the key and the selection computed undercmd;-abuilt no archive, but generated the headers again, which led to the__DECC_fix;-aonly selected, compiled and linked the program.actionlint, shellcheck of the action's script, Pyright and the lint's pattern rules over the changed files.tools/ci/*_test.py,tools/release/changelog_test.py,tools/report/report_test.py,cobalt_ownership_test,hash_doc_tables_test,hash_jamfiles_test,doc_testandrelease_test.Also fixed: main's red tools tests and documentation
Main's last run failed Documentation and Tests of the tools 3/8, 7/8 and 8/8 on one line: the 0.1.0 notes wrote
libc++in prose, whose++Asciidoctor reads as a passthrough. It is code now.On the CI
The first run of this PR fills its caches. A second run should show no
webcpp-openssl.buildin any lane whose configurations were cached.To watch
🤖 Generated with Claude Code